home *** CD-ROM | disk | FTP | other *** search
- ASCDUMP Btrieve File Dump Utility - Version 1.4a
-
- AscDump will dump a Btrieve file using a BASIC TYPE..END TYPE definition
- to define the field layout. It can download and upload ascii files
- to/from Btrieve files, browse Btrieve files and generate XQL table
- definitions for Btrieve files.
-
-
- INSTALLATION
- ============
-
- Unzip the ASCDMP.ZIP file which contains the following files :
-
- ASCDUMP.EXE - the program file
- ASCDUMP.CFG - the program configuration file
- ASCDUMP.DOC - this document
-
- You should place the program and CFG files in a directory referenced by
- your PATH if you want to be able to use the program in any directory.
- Note that the CFG file only controls the screen colours and printer
- destination, the program will proceed happily if it does not find the
- .CFG file.
-
-
- INTERACTIVE USE
- ===============
-
- To use AscDump interactively just enter the command ASCDUMP.
-
- Dump a File
- -----------
-
- Before you can dump a file you must provide :
-
- the name of the Btrieve datafile
- the name of the BASIC program file containing your TYPE definition
- the name of the TYPE within that file
- the name of the Output file
-
- You must also decide whether you want to include a header line in the
- output file. The header line will contain a comma delimited list of the
- field names as the first line in the output file. This is useful if you
- are loading the data into a spreadsheet as it gives each field a label.
-
- Note that if you leave the 'Name of TYPE Record' field blank the program
- will show you a list of TYPE definitions from your source file for you
- to pick the appropriate one.
-
- You will finally be asked if you wish to dump all the fields. Normally
- you will say yes, as the program cannot upload partial downloads.
- However, if you want to take a subset of the fields for some other
- purpose you can select the fields you want to download. You will be
- shown a list of the fields, use the return key to mark/unmark the fields
- to download and choose the "Proceed" option when you are done. Marked
- fields are indicated by a tick-mark next to them.
-
- A download may be aborted by pressing the ESCAPE key.
-
- Load a File
- -----------
-
- To load a file you must specify the same information as with the Dump
- option with the following differences.
-
- The ASCII file must exist and must contain comma delimited records
- relating to the Btrieve File you are loading to.
-
- Note that you can upload data to an existing file, if the program finds
- a record that already exists it will update it with the data from the
- ASCII files. It assumes that the first key defined in your Btrieve file
- is the PRIMARY KEY and is unique. (See Limitations/Disclaimer)
-
- An upload may be aborted by pressing the ESCAPE key.
-
-
- Browse a File
- -------------
-
- Having specified a Btrieve File, and associated BASIC TYPE the Browse
- option will display data from the file one record at a time. You can
- step through the records with the next and previous options, or select a
- record using the first index in the file.
-
- Control Characters in Strings (less than Ascii value 32) are displayed
- as ascii values preceded by a backslash. eg. \002 for CHR$(2)
-
- To modify data move the menu bar over the field you want to alter and
- press return. You can then type in numeric or string data as
- appropriate. Continue to modify fields in this way. When you have made
- all the changes you MUST choose the "Update Record" option to save the
- changes. Note that the program has no way of knowing whether the data
- you have entered makes sense, so exercise care!
-
- When selecting a record the program will pop up an input box containing
- the fields from the first index in the file. You can type in the desired
- key values at this point. The program does not look for an exact match,
- but retrieves the first record that is Greater Than or Equal to your
- input values.
-
- If you have long string fields ( > 50 ) then you should not attempt to edit
- them with this program.
-
-
- Update all Fields in a Btrieve File
- -----------------------------------
-
- This option allows you to perform a "global update" on the data in a
- Btrieve file. You can set fields to a constant value, or to the results
- of an equation. You could use this to increase all prices by 10%, or set
- a particular field to 0.
-
- Note that this update effects ALL the records in the file, so be
- careful!
-
- After specifying the Btrieve file, Basic file and TYPE definition you
- will be taken to a screen similar to the browse screen. Here you can
- move the highlight bar down to the field(s) you are interested in.
- Pressing Return lets you enter an equation for that field. Equations may
- be in two forms.
-
- 1) A constant value, ie. 0, 65, 21.29 or -74. To enter a constant value,
- just type the number you want to set the field to. Remember, this
- effects every occurrence of that field in the Btrieve file.
-
- 2) An equation involving the current field (or others in the same
- record). Several examples of this follow (you enter everything after
- the equals sign) :
-
- PRICE = PRICE * 1.10
- TOTVAL = QUANTITY * PRICE
-
- In the examples above, TOTVAL, QUANTITY and PRICE are fields within the
- TYPE definition for the Btrieve file. As each record is retrieved the
- appropriate value is substituted for the field name and the equation
- evaluated. The result is placed in the appropriate field.
-
- For STRING fields you can set a field to a constant value or the value
- of another field in the TYPE record. You cannot perform arithmetic on
- STRINGS! Some examples follow :
-
- DELETEFLAG = N
- FULLNAME = SURNAME, TITLE FIRSTNAME
- COMMENTS = ""
-
- You must not enclose the values in double or single quotes, with one
- exception. If you wish to set a STRING field to be empty, you must enter
- two double quotes as in the example for COMMENTS above.
-
- There is one special "field" that you can use in equations and that is
- COUNT#. This will be replaced by the current record number, ie. 1 to n
- where n is the number of records in the file. This may be useful if you
- want to generate a unique sequence number for each record. To use it
- just enter COUNT# in the equation just like a field name. A couple of
- examples are shown :
-
- SEQNUM = COUNT#
- SEQNUM = 10000 + COUNT#
-
-
- Global Update Warnings:
- -----------------------
-
- You MUST NOT change any of the Primary Key values using this facility.
- If you do so you could end up missing records out or even in an endless
- loop.
-
- There is no check on overflow when performing arithmetic on fields.
-
- You cannot perform arithmetic on string fields, although you can use
- string fields in equations. However, if the string field does not
- contain numerals then the results will be zero.
-
-
-
- GENERATE XQL TABLE DEFINITION
- =============================
-
- If you are using XQL this option conveniently generates the appropriate
- XQL CREATE TABLE statements for the specified Btrieve file. If you are
- generating a definition for the Btrieve file "CATANK.DB", this option
- will generate two files, "CATANK.XQL" and "CATANK.LOD". The .XQL file
- contains the CREATE TABLE statements while the .LOD file contains some
- Basic INPUT# statements for each field in your Btrieve File. The .LOD
- file can be used if you are writing a program to manipulate an Ascii
- dump, it saves you writing a whole lot of INPUT# statements to read the
- Ascii file.
-
-
-
- COMMAND LINE SWITCHES FOR INTERACTIVE USE:
- ==========================================
-
- /50 will set your PC into 50 line on VGA adaptors. This is intended for
- use with the Browse option as it allows you to see more of your
- record.
-
- /MBF is an optional flag that you can use to access Btrieve files that have
- floating point numbers stored in Microsoft Binary Format (MBF).
- If you use this flag ALL floating point numbers will be treated as
- MBF numbers.
-
- If all of your Btrieve files contain MBF numbers then you can place
- the line FLOAT=MBF in your ASCDUMP.CFG file. If you make this
- change, make sure that the ASCDUMP.CFG is in a directory pointed to
- by the PATH.
-
-
- COMMAND LINE (BATCH) USE
- ========================
-
- You can use ASCDUMP from the command line for automatic or unattended
- downloads/uploads. It is most useful though with the /X flag as you can
- create a batch file to generate XQL definitions for your entire database
- rather than file-by-file. Any time you change your database you can
- rerun this batch file.
-
- The command line syntax is as follows
-
- 1) to dump a file :
-
- ASCDUMP /D BtrieveFile BasicFile BasicTYPE OutPutFile N N [/MBF]
-
- 2) to load a file from ascii to btrieve:
-
- ASCDUMP /R BtrieveFile BasicFile BasicTYPE OutPutFile N N [/MBF]
-
- 3) to generate an XQL definition file :
-
- ASCDUMP /X BtrieveFile BasicFile BasicTYPE [/MBF]
-
- 4) to enter browse mode on a btrieve file :
-
- ASCDUMP /B BtrieveFile BasicFile BasicTYPE [/MBF]
-
- 5) to enter update mode on a btrieve file :
-
- ASCDUMP /U BtrieveFile BasicFile BasicTYPE [/MBF]
-
-
- Warning!
-
- In command line mode minimal error checking is performed, so please be
- careful that you have the parameters correct! (For dumping and loading
- remember to specify N N as 5th and 6th parameters)
-
- Note that the /MBF flag is optional, and if used should appear as the
- last parameter.
-
-
-
- LIMITATIONS/BUGS
- ================
-
- While the program will cope with embedded TYPEs within a TYPE definition
- it will not work with BC7.1 arrays in TYPES yet. You can define the
- fields manually however!
-
- If you pick a TYPE definition that does not match the Btrieve file then
- the program will get confused and very likely do strange things. This
- will only happen if the TYPE definition is the same length as the
- Btrieve file record - but is still the wrong TYPE definition.
-
- There is no support for variable length records.
-
- Maximum Record Length supported is 2048 bytes.
-
- There is no warning if you select an Output File that already exists, it
- will happily write over it.
-
- If you edit the ASCII file, be sure that you do not create extra blank
- lines at the end of the file. If this happens the program will collapse
- with an 'INPUT Past End' error when you reload it. The data will be
- loaded correctly though - it is just messy.
-
- You may have problems uploading data to an existing file if the first
- index defined in the Btrieve file is not a unique index. The program
- uses the first index to try and locate a record before inserting a new
- one. If the first index is non-unique then the AscDump program will
- repeatedly overwrite the first occurence of the index value.
-
- When uploading data to a file, the file must already exist, ASCDUMP will
- not create an empty file.
-
- 'Print a Record' performs no checking to see if the printer is on line.
- You can print to a file by changing the PRDEST= line in the ASCDUMP.CFG
- file.
-
- If you have indexed on part of a field then various options may not work
- correctly. In particular the XQL table definition and Selecting Records
- in Browse Mode. You can get around this by defining a different TYPE
- which has the Partial key defined as a separate item.
-
- If you have defined a composite Btrieve key on several string fields the
- program will cope with this. In the following example you have two
- string fields, but have defined it to Btrieve as a String Index of
- Length 8. The program can sort this out!
-
- TYPE RJob
- SectCode AS STRING * 4
- JobCode AS STRING * 4
- END TYPE
-
-
-
- DISCLAIMER
- ==========
-
- This program was written for in-house use based on our own working
- practices, in particular the first index of all our Btrieve files is a
- Unique Index. While ASCDUMP works to good effect in this environment,
- you may encounter problems with your setup/database design. To avoid
- unpleasant discoveries I strongly urge you to take a backup of your
- datafiles before using the upload feature (or altering records in
- browse mode), particularly if you have a non-unique index as the first
- index.
-
- User of this program acknowledges this disclaimer of warranty:
-
- "This program is supplied as is. The author disclaims all warranties,
- expressed or implied, including, without limitation, the warranties of
- merchantability and of fitness of this program for any purpose. The
- author assumes no liability for damages, direct or consequential, which
- may result from the use of this program."
-
-
- SUPPORT
- =======
-
- For all questions, bug reports, comments and suggestions, please contact:
-
- Christopher Davies
- Ian Davies Graphics (UK) Ltd
- 242 Dover House Road
- Putney
- London SW15 5DA
-
- Phone (+44) (81) 785 9257
- Compuserve: 100016,1164
-
-
- REGISTRATION
- ============
-
- ASCDUMP is ShareWare.
-
- You may make copies of this program and give them to others as long as
- the documentation is provided with the program, both unaltered.
-
- If you like ASCDUMP, a registration fee of $25.00 would be appreciated.
- The next version is free (plus S&H). You will be able to receive
- support by mail or CompuServe.
-
- Please include your name, address, and current version number. (The
- version number may be found on the startup screen) See above for the
- address.
-
-
- HISTORY
- =======
-
- 1.0 Orginal Release
-
- 1.1 Added support for CURRENCY data type
- Added support for files using MBF floating point numbers
- Added command line support for Browse
- Added 'Update ALL Records' facility
- Added ASCDUMP.INI file to remember last interactive settings.
-
- 1.1d Minor Bug Fix for Browse mode (when entering BasicTYPE)
- Minor Bug fix for MBF mode in configuration file
-
- 1.2b Expanded Buffer space to allow for records > 2048 bytes
- Introduced support for arrays in TYPE definitions
-
- 1.3 Skipped for administrative reasons!
-
- 1.4a Fixed problem with incorrectly selected field names in UPDATE
- ALL mode.
-
-